package com.demo.chapter14advcfunction.modulepattern;

//二元操作对象
public class BinOp implements Expr {
	
	String opname;
    Expr left, right;
    public BinOp(String opname, Expr left, Expr right) {
        this.opname = opname;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return "(" + left + " " + opname + " " + right + ")";
    }

}
